home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
AMIGA
/
(A)TA
/
(A)TAP.ADF
/
Documentation
/
calc.doc
< prev
next >
Wrap
Text File
|
1988-10-23
|
2KB
|
57 lines
DOCUMENTATION FOR CALC
Calc is a CLI command which accepts mathematical expressions as
its arguments and outputs the result. When distributing this program
please keep the executeable, source code, and documentation together.
Operator precedence does apply and parenthesis of multiple depths
may be added for precedence clarification. The expression may have white
space, but I advise caution against doing this. If Calc says "Could not
get Command Line" when you type in a mathematical expression this probably
means that you used too much white space. Simply retyping this command
without the spaces will fix the error. Calc also supports the following
math functions and constants:
sin (expr) - returns the sine where expr is in radians
cos (expr) - returns the cosine where expr is in radians
tan (expr) - returns the tangent where expr is in radians
atn (expr) - returns the inverse tangent where expr is in radians
rad (expr) - converts radian expr into degrees
deg (expr) - converts degree expr into radians
exp (expr) - returns the exponetial of expr
ln (expr) - returns the natural log of expr
log (expr) - returns the common logarithm of expr (to the base 10)
sqrt (expr) - returns the square root of expr
e - constant equaling 2.7182818284
pi - constant equaling 3.1415926536
EXAMPLES:
1> calc 2 + 2
4.000000
1> calc 2+3*3+1
12.000000
1> calc pi
3.141592
1> calc ln (e)
1.000000
1> calc sin (sqrt(3))+1
1.987027
As you can see, you may nest the math functions however you want. This
version of Calc requires that you type the math functions and constants
in lower case. This program is Mailware, meaning that if you like it
you have to write me a letter telling me so. I have a problem with the
Shareware concept so if I can't inflate my pocket why not my ego.
Seriously, though, this program comes to you free of charge and free of
guilt that you're ripping off a starving programmer. I'd love to hear
your suggestions on how to improve Calc so contact me at the following
address. Also, if you'd like to see any other Amiga applications let me
know. Thanks, and I hope you enjoy my first contribution to AmigaDom.
Bob Jones
RR #1, Box 150
York, ME 03909